package com.uni.dto;

import java.util.Date;

import com.uni.common.util.SystemConfig;

import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@Data
public class MessageDTO {
	private Long id;
	private Long userId;
	private Long fromUserId;
	private String fromUserProfilePhoto;
	private String title;
	private String content;
	private String orderNo;
	private Integer price;
	private Integer priceType;
	private String ext;
	private Integer type;
	private Integer status;
	private Date updateTime;
	private Date createTime;
	
	public String getFromUserProfilePhotoAll() {
		if(fromUserProfilePhoto != null && !fromUserProfilePhoto.equals("") && !fromUserProfilePhoto.startsWith("http")) {
			return SystemConfig.basePath + fromUserProfilePhoto;
		}
		return fromUserProfilePhoto;
	}
}
